.container
	.row
		.page-header
			h1= title
			small 科幻片

.navbar.navbar-default.navbar-fixed-bottom
	.container
		.navbar-header
			a.navbar-brand(href="/") 科幻片
		if user
			p.navbar-text.navbar-right
				apan 欢迎您,#{user.name}
				span &nbsp;|&nbsp;
				a.navbar-link(href="/logout") 登出
		else
			p.navbar-text.navbar-right
				a.navbar-link(href="/signup") 注册
				span &nbsp;|&nbsp;
				a.navbar-link(href="#", data-toggle="modal" data-target="#signinModal") 登陆

#signupModal.modal.fade
	.modal-dialog
		.modal-content
			form(method="POST", action="/user/signup")
				.modal-header
					button.close(type="button", data-dismiss="modal")
						span(aria-hidden="true") &times;
						span.sr-only Close
					h4.modal-title 注册
				.modal-body
					.form-group
						label(for="signupName") Name
						input#signupName.form-control(type="text", name="user[name]")
					.form-group
						label(for="signupPassword") Password
						input#signupPassword.form-control(type="text", name="user[password]")
				.modal-footer
					button.btn.btn-default(type="button", data-dismiss="modal") Close
					button.btn.btn-primary(type="submit") Submit

#signinModal.modal.fade
	.modal-dialog
		.modal-content
			form(method="POST", action="/user/signin")
				.modal-header
					button.close(type="button", data-dismiss="modal")
						span(aria-hidden="true") &times;
						span.sr-only Close
					h4.modal-title 登陆
				.modal-body
					.form-group
						label(for="signinName") Name
						input#signinName.form-control(type="text", name="user[name]")
					.form-group
						label(for="signinPassword") Password
						input#signinPassword.form-control(type="text", name="user[password]")
				.modal-footer
					button.btn.btn-default(type="button", data-dismiss="modal") Close
					button.btn.btn-primary(type="submit") Login